package com.example.demo.controller;

import com.example.demo.common.utills.CommonResult;
import com.example.demo.common.utills.FileUtil;
import com.example.demo.service.FileService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;


@RestController
public class FileController {

    @Resource
    FileService fileService;



    @RequestMapping("/toFileUp")
    public CommonResult fileUp(MultipartFile multipartFile,String fileName,int uid){
        System.out.println(multipartFile+""+fileName+""+uid);
        return fileService.uploadFile(multipartFile, fileName, uid);
    }



}
